home *** CD-ROM | disk | FTP | other *** search
/ Champak 128 / Vol 128 (Damaged).iso / games / scooby_d.swf / scripts / __Packages / com / ndimedia / ui / RadioButton.as < prev    next >
Encoding:
Text File  |  2011-03-26  |  763 b   |  40 lines

  1. class com.ndimedia.ui.RadioButton extends com.ndimedia.ui.UIObject
  2. {
  3.    var m_value;
  4.    var m_namespace = "RadioButton";
  5.    var m_selected = false;
  6.    var m_group = null;
  7.    function RadioButton(scope, val)
  8.    {
  9.       super(scope,true);
  10.       this.setSize(16,16);
  11.       this.m_value = val;
  12.    }
  13.    function getValue()
  14.    {
  15.       return this.m_value;
  16.    }
  17.    function selectInGroup()
  18.    {
  19.       this.m_group.select(this);
  20.    }
  21.    function select()
  22.    {
  23.       this.m_selected = true;
  24.       this.repaint();
  25.    }
  26.    function unselect()
  27.    {
  28.       this.m_selected = false;
  29.       this.repaint();
  30.    }
  31.    function isSelected()
  32.    {
  33.       return this.m_selected;
  34.    }
  35.    function setGroup(rbg)
  36.    {
  37.       this.m_group = rbg;
  38.    }
  39. }
  40.